package imagingbook.sift.util;

import ij.process.FloatProcessor;

public class IJProcess {

	public static void normalize(FloatProcessor fp) {	// TODO: make this return a new FloatProcesor, make more efficient
		double minVal = fp.getMin();
		double maxVal = fp.getMax();
		fp.add(-minVal);
		fp.multiply(1.0/(maxVal-minVal));
	}

}
